<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head th:replace="header :: common_header(~{::title},~{::link})">
    <title>秒到2.0综合管理后台-编辑公告</title>
    <link th:href="@{/assets/global/plugins/umeditor/umeditor.min.css}" rel="stylesheet" type="text/css" />
	<link th:href="@{/assets/pages/css/store.css}" rel="stylesheet" type="text/css" />
</head>

<body class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
    <div class="page-wrapper">
        <div class="page-header navbar navbar-fixed-top" th:insert="~{index :: navbar-top}">
        </div>
        <div class="clearfix"> </div>
        <div class="page-container">
            <div class="page-sidebar-wrapper" th:insert="~{index :: sidebar}">
            </div>
            <div class="page-content-wrapper">
                <div class="page-content">
                    
<form class="form-horizontal" role="form" action="/p/note/reader/editReader" method="post"  id="modal_new_role">
<div class="form-group">
							<div class="col-md-5">
								<span class="help-block text-center"></span> <input
									type="hidden" name="id" th:value="${note?.id}">
							</div>
						</div>
<!-- <input type="hidden" name="id" th:value="${note?.id}"> -->
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label" ><span
								class="required"> * </span>公告标题</label>
    <div class="col-sm-6">
      <input type="text" class="form-control" th:value="${note?.title}" name="title"  placeholder="公告标题" maxlength="30">
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label"><span
								class="required"> * </span>公告标签</label>
    <div class="col-sm-2">
      <input type="radio" th:field="*{note.label}" value="政策/行政文件"  name="label">政策/行政文件
    </div>
     <div class="col-sm-2">
      <input type="radio" th:field="*{note.label}" value="系统升级/功能更新" name="label">系统升级/功能更新
    </div>
  </div>
  <div class="form-group">
    <label for="firstname" class="col-sm-2 control-label"><span
								class="required"> * </span>公告对象</label>
    <div class="col-sm-2">
      <input type="radio" name="target" th:field="*{note.target}" value="商户">商户
    </div>
     <div class="col-sm-2">
      <input type="radio" name="target" th:field="*{note.target}" value="代理商">代理商
    </div>
  </div>
   <div class="form-group" >
    <label for="firstname" class="col-sm-2 control-label">模板</label>
    <!-- <div class="col-sm-2" th:if="${not #lists.isEmpty(tmpList)}" th:each="tmp:${tmpList}">
      <input th:field="*{note.templates}"   type="checkbox" th:value="${tmp.template}" th:text="${tmp.template=='零售电商'?'云商(秒到2.0)':'来店美业(秒到2.0)'}"  name="templates" >
    </div> -->
			<div class="col-sm-2">
				<input  name="templates" th:field="*{note.templates}"  type="radio" value="零售电商"/>云商(秒到2.0)
			</div>
			<div class="col-sm-2">
				<input name="templates" th:field="*{note.templates}"  type="radio" value="技师服务">秒到来店
			</div>
				</div>
			<!--  <div class="form-group">
			<label for="firstname" class="col-sm-2 control-label"><span
				class="required"> * </span>公告内容</label>
				<textarea th:if="${isZongBu==true}" th:inline="text" style="width: 650px; height: 350px;" name="content" >[[${note.content}]]</textarea>
		        <textarea th:if="${isZongBu==false}" th:inline="text" style="width: 650px; height: 350px;background-color: #EEF1F5"  name="content"  readonly>[[${note.content}]]</textarea>
		    </div>
		    -->
						<div class="form-group">
							<lable class="col-md-2 control-label"> <span
								class="required"> * </span>公告内容</lable>
							<div class="col-md-8">
								<!-- 加载编辑器的容器 -->
								<script id="container" name="content" type="text/plain"
									style="width: 650px; height: 300px;">
								</script>
								<div>
								</div>
							   <div><span class="required"  style="color: #666" id="gg">*公告字数:字数应控制在10000字以内</span></div>
								<div id="pro_txt" class="hidden">[[${note.content}]]</div>
								<div id="btn-uploader1">
									<a id="pickfiles1" href="javascript:void 0;"></a>
								</div>
							</div>
						</div>
						<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
 <button type="button" class="btn btn-info" th:if="${isZongBu==true}" id="save">修改</button>
 <button type="button" class="btn" onclick="beback();">返回</button>
    </div>
  </div>
</form>
        </div>
        <div class="page-footer">
            <div class="page-footer-inner"> 2017 &copy; 秒迅科技</a>
            </div>
            <div class="scroll-to-top">
                <i class="icon-arrow-up"></i>
            </div>
        </div>
    </div>
</body>
	<script th:src="@{/assets/pages/scripts/notes.js}"
		type="text/javascript"></script>
	<!-- 配置文件 -->
    <script type="text/javascript" th:src="@{/assets/global/plugins/umeditor/template.min.js}"></script>
    <script type="text/javascript" th:src="@{/assets/global/plugins/umeditor/umeditor.config.js}"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" th:src="@{/assets/global/plugins/umeditor/umeditor.min.js}"></script>
    <!-- 实例化编辑器 -->
    <!-- 实例化编辑器 -->
		<script type="text/javascript">
			window.UMEDITOR_CONFIG.toolbar = [
				// 加入一个 test
			 'source | fontfamily fontsize | justifyleft justifycenter justifyright | bold italic underline strikethrough  forecolor | insertorderedlist insertunorderedlist | imagedes'
			];

			var um = UM.getEditor('container'); 
			$(document).ready(function() {
				var pro_value = $("#pro_txt").text();
				um.ready(function() { //编辑器初始化完成再赋值  
					um.setContent(pro_value); //赋值给UEditor  
				});
			});
		</script>
</body>	
</html>